package com.szqhyxj.youxiangju.biz.merchantHome;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.ArrayList;
import java.util.List;

public class MerchantFragmentsContainer extends FragmentStatePagerAdapter {

    private List<Fragment> fragments = new ArrayList<>();

    MerchantFragmentsContainer(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.fragments.addAll(fragments);
    }

    @Override
    public Fragment getItem(int i) {
        return fragments.get(i);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

}